user_print = input("请输入数字（输入q则退出程序：）")
total = 0
count = 0
while user_print != "q":
    num = float(user_print)
    total = total + num
    count = count + 1
    user_print = input("请输入数字（输入q则退出程序：）")
if count == 0:
    result = 0
else:
    result = total / count
print("您输入的数字平均值为：",result)   #print("" + str(result))
